package cn.nexd.app.util;

import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Build;
import android.support.v4.widget.DrawerLayout;
import android.view.ViewGroup;
import android.view.Window;
import android.view.WindowManager;
import android.widget.FrameLayout;

import com.readystatesoftware.systembartint.SystemBarTintManager;

/**
 * Created by xun on 2016/5/5.
 */
public class AppUtils {
    private Context context;

    /**
     * 获取状态栏高度
     *
     * @param context
     * @return 状态栏高度
     */
    public static int getSystemBarHeight(Context context) {
        try {
            Class localClass = Class.forName("com.android.internal.R$dimen");
            Object localObject = localClass.newInstance();
            int i = Integer.parseInt(localClass.getField("status_bar_height").get(localObject).toString());
            i = context.getResources().getDimensionPixelSize(i);
            return i;
        } catch (Exception paramContext) {
            paramContext.printStackTrace();
        }
        return 0;
    }


}

